Add v1 holdings summary endpoint without holding fees#5030
Open
samsondav wants to merge 7 commits intohyperledger-labs:mainfrom
Open
Add v1 holdings summary endpoint without holding fees#5030samsondav wants to merge 7 commits intohyperledger-labs:mainfrom
samsondav wants to merge 7 commits intohyperledger-labs:mainfrom
Conversation
1956d58 to
47bb5b1
Compare
…bs#4094) The holding fees in the scan summary endpoint don't express a meaningful aggregate value, and total_available_coin deducting holding fees is incorrect. Introduce /v1/holdings/summary that drops all holding fee fields and the as_of_round parameter, keeping only party_id, total_unlocked_coin, total_locked_coin, and total_coin_holdings. Deprecate /v0/holdings/summary. Signed-off-by: Sam Davies <samsondav@protonmail.com>
- Add `deprecated: true` to /v0/holdings/summary per project convention - Fix v1 description to reference /v0/holdings/state (not non-existent /v1) - Add validator scan-proxy v1 holdings summary test Signed-off-by: Sam Davies <samsondav@protonmail.com>
47bb5b1 to
cad5b1b
Compare
- Add `deprecated: true` and `tags: [deprecated]` to /v0/scan-proxy/holdings/summary for consistency with scan.yaml - Add non-zero assertion on v1 totalCoinHoldings to catch all-zeros bugs Signed-off-by: Sam Davies <samsondav@protonmail.com>
… query - Store-level: verify coin totals are round-independent at asOfRound=0 and fee fields go negative (documenting v1 endpoint behavior) - Store-level: verify empty summaries for party with no holdings - Integration: multi-party v1 query with alice+bob, assert alice results match single-party query Signed-off-by: Sam Davies <samsondav@protonmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/v1/holdings/summaryscan endpoint that drops all holding fee fields (accumulated_holding_fees_unlocked,accumulated_holding_fees_locked,accumulated_holding_fees_total,total_available_coin) and theas_of_roundrequest parameter, as these don't express meaningful aggregate values/v0/holdings/summaryCloses #4094
Test plan
apps-scan/compile,apps-validator/compile,apps-app/compile, andapps-app/Test/compileall passScanTimeBasedIntegrationTestverify v1 response contains correct coin totals matching v0 and handlesatOrBeforerecord time matching — executed in CIparty_id,total_unlocked_coin,total_locked_coin,total_coin_holdingsper summary entry — confirmed from Guardrail-generatedHoldingsSummaryV1case class